3.25 \(\int \sqrt {a+b \cot ^2(x)} \tan ^4(x) \, dx\)

Optimal. Leaf size=85 \[ -\sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+\frac {1}{3} \tan ^3(x) \sqrt {a+b \cot ^2(x)}-\frac {(3 a-b) \tan (x) \sqrt {a+b \cot ^2(x)}}{3 a} \]

[Out]

-arctan(cot(x)*(a-b)^(1/2)/(a+b*cot(x)^2)^(1/2))*(a-b)^(1/2)-1/3*(3*a-b)*(a+b*cot(x)^2)^(1/2)*tan(x)/a+1/3*(a+
b*cot(x)^2)^(1/2)*tan(x)^3

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3670, 475, 583, 12, 377, 203} \[ \frac {1}{3} \tan ^3(x) \sqrt {a+b \cot ^2(x)}-\sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-\frac {(3 a-b) \tan (x) \sqrt {a+b \cot ^2(x)}}{3 a} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*Cot[x]^2]*Tan[x]^4,x]

[Out]

-(Sqrt[a - b]*ArcTan[(Sqrt[a - b]*Cot[x])/Sqrt[a + b*Cot[x]^2]]) - ((3*a - b)*Sqrt[a + b*Cot[x]^2]*Tan[x])/(3*
a) + (Sqrt[a + b*Cot[x]^2]*Tan[x]^3)/3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 475

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[((e*x)^(m
 + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q)/(a*e*(m + 1)), x] - Dist[1/(a*e^n*(m + 1)), Int[(e*x)^(m + n)*(a + b*
x^n)^p*(c + d*x^n)^(q - 1)*Simp[c*b*(m + 1) + n*(b*c*(p + 1) + a*d*q) + d*(b*(m + 1) + b*n*(p + q + 1))*x^n, x
], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[0, q, 1] && LtQ[m, -1] &&
IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 583

Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[(e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*c*g*(m + 1)), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
 IGtQ[n, 0] && LtQ[m, -1]

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \sqrt {a+b \cot ^2(x)} \tan ^4(x) \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x^2}}{x^4 \left (1+x^2\right )} \, dx,x,\cot (x)\right )\\ &=\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)-\frac {1}{3} \operatorname {Subst}\left (\int \frac {-3 a+b-2 b x^2}{x^2 \left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )\\ &=-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)+\frac {\operatorname {Subst}\left (\int -\frac {3 a (a-b)}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )}{3 a}\\ &=-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)+(-a+b) \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )\\ &=-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)+(-a+b) \operatorname {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )\\ &=-\sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-\frac {(3 a-b) \sqrt {a+b \cot ^2(x)} \tan (x)}{3 a}+\frac {1}{3} \sqrt {a+b \cot ^2(x)} \tan ^3(x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.65, size = 174, normalized size = 2.05 \[ \frac {1}{3} \sin ^2(x) \tan ^3(x) \sqrt {a+b \cot ^2(x)} \left (\frac {b \cot ^2(x)}{a}+1\right ) \left (\frac {\csc ^2(x) \left (a-2 b \cot ^2(x)\right ) \left (\sqrt {\frac {(a-b) \cos ^2(x)}{a}} \sin ^{-1}\left (\sqrt {\frac {(a-b) \cos ^2(x)}{a}}\right )+\sqrt {\frac {b \cos ^2(x)}{a}+\sin ^2(x)}\right )}{\left (a+b \cot ^2(x)\right ) \sqrt {\frac {b \cos ^2(x)}{a}+\sin ^2(x)}}-\frac {4 (a-b) \cos ^2(x) \left (a+b \cot ^2(x)\right ) \, _2F_1\left (2,2;\frac {3}{2};\frac {(a-b) \cos ^2(x)}{a}\right )}{a^2}\right ) \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Sqrt[a + b*Cot[x]^2]*Tan[x]^4,x]

[Out]

(Sqrt[a + b*Cot[x]^2]*(1 + (b*Cot[x]^2)/a)*Sin[x]^2*((-4*(a - b)*Cos[x]^2*(a + b*Cot[x]^2)*Hypergeometric2F1[2
, 2, 3/2, ((a - b)*Cos[x]^2)/a])/a^2 + ((a - 2*b*Cot[x]^2)*Csc[x]^2*(ArcSin[Sqrt[((a - b)*Cos[x]^2)/a]]*Sqrt[(
(a - b)*Cos[x]^2)/a] + Sqrt[(b*Cos[x]^2)/a + Sin[x]^2]))/((a + b*Cot[x]^2)*Sqrt[(b*Cos[x]^2)/a + Sin[x]^2]))*T
an[x]^3)/3

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 239, normalized size = 2.81 \[ \left [\frac {3 \, a \sqrt {-a + b} \log \left (-\frac {a^{2} \tan \relax (x)^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \relax (x)^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \relax (x)^{3} - {\left (a - 2 \, b\right )} \tan \relax (x)\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{\tan \relax (x)^{4} + 2 \, \tan \relax (x)^{2} + 1}\right ) + 4 \, {\left (a \tan \relax (x)^{3} - {\left (3 \, a - b\right )} \tan \relax (x)\right )} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{12 \, a}, -\frac {3 \, \sqrt {a - b} a \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)}{a \tan \relax (x)^{2} - a + 2 \, b}\right ) - 2 \, {\left (a \tan \relax (x)^{3} - {\left (3 \, a - b\right )} \tan \relax (x)\right )} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{6 \, a}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)^2)^(1/2)*tan(x)^4,x, algorithm="fricas")

[Out]

[1/12*(3*a*sqrt(-a + b)*log(-(a^2*tan(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan(x)^3
- (a - 2*b)*tan(x))*sqrt(-a + b)*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(tan(x)^4 + 2*tan(x)^2 + 1)) + 4*(a*tan(x)^3
 - (3*a - b)*tan(x))*sqrt((a*tan(x)^2 + b)/tan(x)^2))/a, -1/6*(3*sqrt(a - b)*a*arctan(2*sqrt(a - b)*sqrt((a*ta
n(x)^2 + b)/tan(x)^2)*tan(x)/(a*tan(x)^2 - a + 2*b)) - 2*(a*tan(x)^3 - (3*a - b)*tan(x))*sqrt((a*tan(x)^2 + b)
/tan(x)^2))/a]

________________________________________________________________________________________

giac [B]  time = 0.25, size = 476, normalized size = 5.60 \[ -\frac {1}{6} \, {\left (3 \, \sqrt {-a + b} \log \left ({\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{2}\right ) - \frac {4 \, {\left (3 \, {\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{4} {\left (2 \, a - b\right )} \sqrt {-a + b} - 6 \, {\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{2} a^{2} \sqrt {-a + b} + {\left (4 \, a^{3} - a^{2} b\right )} \sqrt {-a + b}\right )}}{{\left ({\left (\sqrt {-a + b} \cos \relax (x) - \sqrt {-a \cos \relax (x)^{2} + b \cos \relax (x)^{2} + a}\right )}^{2} - a\right )}^{3}}\right )} \mathrm {sgn}\left (\sin \relax (x)\right ) + \frac {{\left (3 \, a^{2} \sqrt {-a + b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 9 \, a^{2} \sqrt {b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 15 \, a \sqrt {-a + b} b \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 21 \, a b^{\frac {3}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 12 \, \sqrt {-a + b} b^{2} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 12 \, b^{\frac {5}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 8 \, a^{2} \sqrt {-a + b} - 18 \, a^{2} \sqrt {b} - 24 \, a \sqrt {-a + b} b + 30 \, a b^{\frac {3}{2}} + 12 \, \sqrt {-a + b} b^{2} - 12 \, b^{\frac {5}{2}}\right )} \mathrm {sgn}\left (\sin \relax (x)\right )}{6 \, {\left (a^{2} + 3 \, a \sqrt {-a + b} \sqrt {b} - 5 \, a b - 4 \, \sqrt {-a + b} b^{\frac {3}{2}} + 4 \, b^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)^2)^(1/2)*tan(x)^4,x, algorithm="giac")

[Out]

-1/6*(3*sqrt(-a + b)*log((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + a))^2) - 4*(3*(sqrt(-a + b)*co
s(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + a))^4*(2*a - b)*sqrt(-a + b) - 6*(sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)^
2 + b*cos(x)^2 + a))^2*a^2*sqrt(-a + b) + (4*a^3 - a^2*b)*sqrt(-a + b))/((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)
^2 + b*cos(x)^2 + a))^2 - a)^3)*sgn(sin(x)) + 1/6*(3*a^2*sqrt(-a + b)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) -
 9*a^2*sqrt(b)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) - 15*a*sqrt(-a + b)*b*log(-a - 2*sqrt(-a + b)*sqrt(b) +
2*b) + 21*a*b^(3/2)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + 12*sqrt(-a + b)*b^2*log(-a - 2*sqrt(-a + b)*sqrt(
b) + 2*b) - 12*b^(5/2)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + 8*a^2*sqrt(-a + b) - 18*a^2*sqrt(b) - 24*a*sqr
t(-a + b)*b + 30*a*b^(3/2) + 12*sqrt(-a + b)*b^2 - 12*b^(5/2))*sgn(sin(x))/(a^2 + 3*a*sqrt(-a + b)*sqrt(b) - 5
*a*b - 4*sqrt(-a + b)*b^(3/2) + 4*b^2)

________________________________________________________________________________________

maple [B]  time = 0.77, size = 951, normalized size = 11.19 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*cot(x)^2)^(1/2)*tan(x)^4,x)

[Out]

-1/6*(-1+cos(x))*(cos(x)^3*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*b^(3/2)+3*cos(x)^3*ln(
4*cos(x)*(-a+b)^(1/2)*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)-4*a*cos(x)+4*b*cos(x)+4*(-a+b)^(1/2)*(-(
a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2))*b^(3/2)*a-4*cos(x)^3*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(
1/2)*(-a+b)^(1/2)*b^(1/2)*a+3*cos(x)^3*ln(-4*(-1+cos(x))*(cos(x)*b^(1/2)*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1
)^2)^(1/2)+a*cos(x)-b*cos(x)+(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*b^(1/2)+a)/sin(x)^2/b^(1/2))*(-a+
b)^(1/2)*a^2-3*cos(x)^3*ln(-4*(-1+cos(x))*(cos(x)*b^(1/2)*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)+a*co
s(x)-b*cos(x)+(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*b^(1/2)+a)/sin(x)^2/b^(1/2))*(-a+b)^(1/2)*a*b-3*
cos(x)^3*ln(-2*(-1+cos(x))*(cos(x)*b^(1/2)*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)+a*cos(x)-b*cos(x)+(
-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*b^(1/2)+a)/sin(x)^2/b^(1/2))*(-a+b)^(1/2)*a^2+3*cos(x)^3*ln(-2*
(-1+cos(x))*(cos(x)*b^(1/2)*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)+a*cos(x)-b*cos(x)+(-(a*cos(x)^2-b*
cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*b^(1/2)+a)/sin(x)^2/b^(1/2))*(-a+b)^(1/2)*a*b-3*cos(x)^3*ln(4*cos(x)*(-a+b)^(1
/2)*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)-4*a*cos(x)+4*b*cos(x)+4*(-a+b)^(1/2)*(-(a*cos(x)^2-b*cos(x
)^2-a)/(cos(x)+1)^2)^(1/2))*b^(1/2)*a^2+cos(x)^2*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*
b^(3/2)-4*cos(x)^2*(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*b^(1/2)*a+cos(x)*(-(a*cos(x)^2
-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*b^(1/2)*a+(-(a*cos(x)^2-b*cos(x)^2-a)/(cos(x)+1)^2)^(1/2)*(-a+
b)^(1/2)*a*b^(1/2))*((a*cos(x)^2-b*cos(x)^2-a)/(-1+cos(x)^2))^(1/2)/cos(x)^3/sin(x)/(-(a*cos(x)^2-b*cos(x)^2-a
)/(cos(x)+1)^2)^(1/2)*4^(1/2)/(-a+b)^(1/2)/a/b^(1/2)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {b \cot \relax (x)^{2} + a} \tan \relax (x)^{4}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)^2)^(1/2)*tan(x)^4,x, algorithm="maxima")

[Out]

integrate(sqrt(b*cot(x)^2 + a)*tan(x)^4, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\relax (x)}^4\,\sqrt {b\,{\mathrm {cot}\relax (x)}^2+a} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)^4*(a + b*cot(x)^2)^(1/2),x)

[Out]

int(tan(x)^4*(a + b*cot(x)^2)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a + b \cot ^{2}{\relax (x )}} \tan ^{4}{\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cot(x)**2)**(1/2)*tan(x)**4,x)

[Out]

Integral(sqrt(a + b*cot(x)**2)*tan(x)**4, x)

________________________________________________________________________________________